import { request } from '@/plugins/request'

/* 获取个人信息 */
export const getProfile = username => {
  return request({
    url: `/api/profiles/${username}`,
    method: 'GET',
  })
}

/* 关注用户 */
export const follow = username => {
  return request({
    url: `/api/profiles/${username}/follow`,
    method: 'POST',
  })
}

/* 取关 */
export const unfollow = username => {
  return request({
    url: `/api/profiles/${username}/follow`,
    method: 'DELETE',
  })
}
